package ord.csmz.xg2333.Example01;

public class Shape {
    private String type;
    private String color;
    public Shape(String type,String color){
        this.type = type;
        this.color = color;
    }
    @Override
    public boolean equals(Object obj){
        if (this == obj){
            return true;
        }
        if (obj == null || !(obj instanceof Shape)){
            return false;
        }
        Shape shape = (Shape) obj;
        return this.type.equals(shape.type) && this.color.equals(shape.color);
    }

    @Override
    public String toString() {
        return "Shape{" +
                "type='" + type + '\'' +
                ", color='" + color + '\'' +
                '}';
    }
}
